package com.hyt.it.ogt.ks.enums;

import lombok.Getter;

/**
 * photoCompare-照片比对，screenSnapshot-屏幕快照，
 * leaveExam-离开答题，face-人脸核身
 * openPromise-考生承诺，deviceCheck-设备检测，loginOut-考生登出状态，
 */
@Getter
public enum LogTypeCode {
    OPEN_PROMISE("openPromise", "考生承诺"),
    LOGIN_OUT("loginOut", "考生登出状态"),
    LEAVE_EXAM("leaveExam", "离开答题"),
    START_EXAM("startExam", "开始考试"),
    ID_FACE("idFace", "人脸核身"),
    PHOTO_COMPARE("photoCompare", "照片比对"),
    SCREEN_SNAPSHOT("screenSnapshot", "屏幕快照"),
    DEVICE_CHECK("deviceCheck", "设备检测");

    private String code;
    private String msg;

    public static LogTypeCode getMsg(String code) {
        for (LogTypeCode value : LogTypeCode.values()) {
            if(value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
    LogTypeCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
